const express = require("express");
const app = express();
const bodyParser = require("body-parser");
app.use(bodyParser.urlencoded({
    extended: true
}))
app.use(express.static("public"))
//get 请求 
app.get("/text_get_parse", (req, res) => {
    console.log(req.query)
    res.end("chenggong")
})
app.get("/text_get_parmes/:id/:age", (req, res) => {
    console.log(req.params)
    res.end("chenggong")
})

app.post("/test_post", (req, res) => {
    console.log(req.body)
    res.end("chenggong")
})

app.listen(8080, err => {
    if (!err) {
        console.log("SEVER_START_SUCCEED")
    } else {
        console.log("SEVER_START_FAILED")
    }
})